<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>ANNOUNCEMENT</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="announcementController.do?doAdd" >
					<input id="id" name="id" type="hidden" value="${announcementPage.id }"/>
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
			<!--	<tr>
					<td align="right">
						<label class="Validform_label">
							竞价ID:
						</label>
					</td>
					<td class="value">
					     	 <input id="announcementid" name="announcementid" type="text" maxlength="38" style="width: 150px" class="inputxt"  datatype="n"  ignore="checked" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">竞价ID</label>
						</td>
					<td align="right">
						<label class="Validform_label">
							系统编号:
						</label>
					</td>
					<td class="value">
					     	 <input id="sysid" name="sysid" type="text" maxlength="38" style="width: 150px" class="inputxt"  datatype="n"  ignore="checked" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">系统编号</label>
						</td>
					</tr>  -->
				
				<tr>

				<!-- 	<td align="right">
						<label class="Validform_label">
							交易类型:
						</label>
					</td>
					<td class="value">
							  <t:dictSelect field="trademode" type="list"  typeGroupCode="TRADEMODE"  defaultVal="${announcementPage.trademode}" hasLabel="false"  title="交易类型" ></t:dictSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">公告类型</label>
						</td> -->
						<td align="right">
						<label class="Validform_label">
							竞价类型:
						</label>
					</td>
					<td class="value">
							  <t:dictSelect id="annountype"  datatype="*"  field="annountype" type="list"  typeGroupCode="ANNOUNTYPE"  defaultVal="${announcementPage.annountype}" hasLabel="false"  title="竞价类型"  ></t:dictSelect>     
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">竞价类型</label>
						</td>
						<td align="right">
						<label class="Validform_label">
							竞价单号:
						</label>
					</td>
					<td class="value" >
					<input id="pocode" name="pocode" type="text"  style="width: 150px" class="form-control searchbox-inputtext" onClick="openpop();" value="" readonly="readonly">
					
					     <!--	 <input id="pocode" name="pocode" type="text" maxlength="50" style="width: 450px" class="inputxt"  ignore="ignore" />  -->
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">竞价单号</label>
						</td>
					</tr>
					<tr>
					<td align="right">
						<label class="Validform_label">
							联系人:
						</label>
					</td>
					<td class="value">
					     	 <input id="lianxr"  ignore="checked"   name="lianxr" type="text" maxlength="50" style="width: 150px" class="inputxt" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">联系人</label>
						</td>
					
					<td align="right">
						<label class="Validform_label">
							联系电话:
						</label>
					</td>
					<td class="value">
					     	 <input id="lianxdh"  ignore="checked"  name="lianxdh" type="text" maxlength="50" style="width: 150px" class="inputxt"/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">联系电话</label>
						</td>
					</tr>
				
					<!--<tr> <td align="right">
						<label class="Validform_label">
							单据ID:
						</label>
					</td>
					<td class="value">
					     	 <input id="poid" name="poid" type="text" maxlength="19" style="width: 150px" class="inputxt"  datatype="n"  ignore="ignore" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">单据ID</label>
						</td>	</tr> -->
					
				
				<!--<tr>
				 	<td align="right">
						<label class="Validform_label">
							用户编号:
						</label>
					</td>
					<td class="value">
					     	 <input id="userid" name="userid" type="text" maxlength="19" style="width: 150px" class="inputxt"  datatype="n"  ignore="ignore" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">用户编号</label>
						</td>
					
					</tr> -->
			<!--  	<tr>
					<td align="right">
						<label class="Validform_label">
							录入时间:
						</label>
					</td>
					<td class="value">
							   <input id="annountime" name="annountime" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()"  datatype="*"  ignore="checked" />    
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">录入时间</label>
						</td>
					<td align="right">
						<label class="Validform_label">
							状态 1.待确认 2.已审核:
						</label>
					</td>
					<td class="value">
							  <t:dictSelect field="zhuangt" type="list"  typeGroupCode="ANNOSTATUS"  defaultVal="${announcementPage.zhuangt}" hasLabel="false"  title="状态 1.待确认 2.已审核" ></t:dictSelect>     
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">状态 1.待确认 2.已审核</label>
						</td>
					</tr>-->
				<tr>
					<td align="right">
						<label class="Validform_label">
							竞价标题:
						</label>
					</td>
					<td class="value" colspan="3">
					     	 <input id="annountitle" name="annountitle" type="text" maxlength="200" style="width: 450px" class="inputxt"  datatype="*"  ignore="checked" />
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">竞价标题</label>
						</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							公告内容:
						</label>
					</td>
					<td class="value"  colspan="3">
					<script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
					<script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.all.js"></script>
						<textarea  id="announcontent" name="announcontent"  style="height:300px;width:95%" ignore="checked" datatype="*"></textarea>
						<script type="text/javascript">
							var ue = UE.getEditor('announcontent',"myblockquote");
							ue.commands['addlink'] = {
          execCommand: function() {
          if($("#pocode").val()==""){
          alert("请先选择竞价单号");
          }else{
            this.execCommand('insertHtml', "<br/><br/><br/><a href='http://222.74.142.137:7710/announce/BaoMing.jspx?pocode="+$("#pocode").val()+"&treadmode=3'>报名链接</a>"); 
            return true; 
          }
          
          
          }, 
          queryCommandState: function() {
           } 
        };
							    </script>
					
					
						  	 <!-- <textarea style="height:auto;width:95%" class="inputxt" rows="6" datatype="*"  ></textarea> -->
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">公告内容</label>
						</td>
					</tr>
					
			</table>
		</t:formvalid>
		<script>
		function openpop(){
		
		 var annountype=$("#annountype").val();
		 if(annountype==""){
		 alert("请先选择竞价类型");
		 }else{
		 popupClick(this,'poid,pocode','poid,pocode','postorder_select&abc='+annountype);
		 }
		
		}
		
		</script>
 </body>
